package com.msl.debezium.service.impl;

import com.msl.debezium.dto.DebeziumTestDto;
import com.msl.debezium.mapper.DebeziumTestMapper;
import com.msl.debezium.service.DebeziumTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class DebeziumTestServiceImpl implements DebeziumTestService {

    @Autowired
    private DebeziumTestMapper debeziumMapper;

    @Override
    public DebeziumTestDto findByTableName(String tableName, Date date) {
        return debeziumMapper.findByTableName(tableName, date);
    }

    @Override
    public List<DebeziumTestDto> findAllByDate(Date date) {
        return debeziumMapper.findAllByDate(date);
    }

    @Override
    public void addDebeziumTest(DebeziumTestDto debeziumTestDto) {
        debeziumMapper.addDebeziumTest(debeziumTestDto);
    }

    @Override
    public void updateDebeziumTest(DebeziumTestDto debeziumTestDto) {
        debeziumMapper.updateDebeziumTest(debeziumTestDto);
    }
}
